//
//  FillInTheOrderTableViewCell.swift
//  OnceNectar
//
//  Created by 法正磊 on 2018/3/9.
//  Copyright © 2018年 com.inwhoop. All rights reserved.
//

import UIKit

class FillInTheOrderTableViewCell: UITableViewCell {
    
    @IBOutlet weak var showImageView: UIImageView!
    @IBOutlet weak var describeLabel: UILabel!
    @IBOutlet weak var specificationsLabel: UILabel!
    @IBOutlet weak var priceLabel: UILabel!
    override func awakeFromNib() {
        super.awakeFromNib()
    }
    
    func bindData(model: cartModel) -> Void {
        showImageView.sd_setImage(with: appendUrl(suffix: model.imageUrl!), completed: nil)
        let number :String = model.number!
        let spec :String = model.specAndCol!
        let name :String = model.goodsName!
        describeLabel.text = "\(name)*\(number)"
        specificationsLabel.text = spec
        priceLabel.attributedText = NSMutableAttributedString.differentColorAndSizeString(first: (firstString: "￥", firstColor: ONColor.subTextColor, firstSize: 13), second: (secondString: model.price! as NSString, secondColor: ONColor.pirceLabelColor, secondSize: 16))
    }

    override func setSelected(_ selected: Bool, animated: Bool) {
        super.setSelected(selected, animated: animated)

        // Configure the view for the selected state
    }
    
}
